home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.tools.mfc,comp.lang.c++
- Path: indra.com!usenet
- From: tjv@indra.com (Tom Vilot)
- Subject: Re: Linked Lists
- Message-ID: <DpME74.2uF.0.server@indra.com>
- Sender: usenet@indra.com (System Operator)
- Organization: Indra's Net, Inc.
- Date: Wed, 10 Apr 1996 00:20:14 GMT
- References: <4k2kom$k5r@news2.cts.com> <31667AC8.4EE2@mindlink.bc.ca>
- X-Newsreader: Forte Free Agent 1.0.82
- X-Nntp-Posting-Host: net.indra.com
-
- Blake Kadatz wrote:
-
- >> I would like to store all the objects in a linked list for a given window.
-
- >Have you tried CObList or CPtrList?
-
- These are some of the really nice parts of VC++/MFC.
-
- John, I'd recommend that you read up on these, and all their
- permutations (CMapStringToOb, CMapWordToOb, CMapWordToPtr, or whatever
- else there is...). They essentially implement linked lists and hash
- tables for you. Very sleek. Very easy to use. Very nice.
-
- These list-based objects, as Blake indicated, do not do all kinds of
- "automatic" memory allocation/deallocation for you - but you *could*
- subclass one of them, or you could write your own object which
- utilizes one of these lists within itself, and does all the list
- access and memory management for you.
-
- >> ...and return the pointer to the subclass that is allocating the objects
- >> on the linked list.
-
- I'm not entirely clear on what you mean here. Do you mean something
- like this?:
-
- void CSomeObject::MakeNewListMember(CLinkedList *list)
- {
- CMyObject *object = new CMyObject;
- CNewObject *newObject = object->MakeANewGuy();
-
- list->AddToTail(newObject);
- }
-
- ??
-
-
- +---------------------------------------------------------------+
- | Thomas J. Vilot || Digital Artist |
- | Boulder, Colorado || Multimedia Developer |
- | Photographer |
- | <href="http://www.indra.com/~tjv/"> |
- +---------------------------------------------------------------+
-
-